home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1996-05-01  |  33.6 KB  |  1,359 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  19. __CMAPPLICATION__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  31.     include 'Printing.a'
  32.     ENDIF
  33.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  34.     include 'CMICCProfile.a'
  35.     ENDIF
  36.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  37.  
  38. kDefaultCMMSignature            EQU        'appl'
  39. ;  Macintosh 68K trap word 
  40.  
  41. cmTrap                            EQU        $ABEE
  42. ;  PicComment IDs 
  43.  
  44. cmBeginProfile                    EQU        220
  45. cmEndProfile                    EQU        221
  46. cmEnableMatching                EQU        222
  47. cmDisableMatching                EQU        223
  48. cmComment                        EQU        224
  49. ;  PicComment selectors for cmComment 
  50.  
  51. cmBeginProfileSel                EQU        0
  52. cmContinueProfileSel            EQU        1
  53. cmEndProfileSel                    EQU        2
  54. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  55.  
  56. cmMatchCMMType                    EQU        $00000001
  57. cmMatchApplProfileVersion        EQU        $00000002
  58. cmMatchDataType                    EQU        $00000004
  59. cmMatchDeviceType                EQU        $00000008
  60. cmMatchDeviceManufacturer        EQU        $00000010
  61. cmMatchDeviceModel                EQU        $00000020
  62. cmMatchDeviceAttributes            EQU        $00000040
  63. cmMatchFlags                    EQU        $00000080
  64. cmMatchOptions                    EQU        $00000100
  65. cmMatchWhite                    EQU        $00000200
  66. cmMatchBlack                    EQU        $00000400
  67. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  68.  
  69. cmMatchAnyProfile                EQU        $00000000
  70. cmMatchProfileCMMType            EQU        $00000001
  71. cmMatchProfileClass                EQU        $00000002
  72. cmMatchDataColorSpace            EQU        $00000004
  73. cmMatchProfileConnectionSpace    EQU        $00000008
  74. cmMatchManufacturer                EQU        $00000010
  75. cmMatchModel                    EQU        $00000020
  76. cmMatchAttributes                EQU        $00000040
  77. cmMatchProfileFlags                EQU        $00000080
  78. ;  Result codes 
  79.  
  80.                                                             ; General Errors 
  81. cmProfileError                    EQU        -170
  82. cmMethodError                    EQU        -171
  83. cmMethodNotFound                EQU        -175                ; CMM not present 
  84. cmProfileNotFound                EQU        -176                ; Responder error 
  85. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  86. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  87. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  88. cmCantDeleteProfile                EQU        -180                ; Responder error 
  89. cmUnsupportedDataType            EQU        -181                ; Responder error 
  90. cmNoCurrentProfile                EQU        -182                ; Responder error 
  91.                                                             ; Profile Access Errors 
  92. cmElementTagNotFound            EQU        -4200
  93. cmIndexRangeErr                    EQU        -4201                ; Index out of range 
  94. cmCantDeleteElement                EQU        -4202
  95. cmFatalProfileErr                EQU        -4203
  96. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  97. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  98.                                                             ; Profile Search Errors 
  99. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  100. cmSearchError                    EQU        -4207
  101. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  102. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  103. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  104. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  105. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  106. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  107.                                                             ; Color Conversion Errors 
  108. cmRangeOverFlow                    EQU        -4214                ; Warning that some output color values over/underflowed and were clipped 
  109.                                                             ; Other Profile Access Errors 
  110. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  111.                                                             ; NamedColor Errors 
  112. cmNamedColorNotFound            EQU        -4216                ; namedColor not found 
  113. ;  deviceType values for ColorSync 1.0 Device Profile access 
  114.  
  115. cmSystemDevice                    EQU        'sys '
  116. cmGDevice                        EQU        'gdev'
  117. ;  Commands for CMFlattenUPP(…) 
  118.  
  119. cmOpenReadSpool                    EQU        1
  120. cmOpenWriteSpool                EQU        2
  121. cmReadSpool                        EQU        3
  122. cmWriteSpool                    EQU        4
  123. cmCloseSpool                    EQU        5
  124. ;  Flags for PostScript-related functions 
  125.  
  126. cmPS7bit                        EQU        1
  127. cmPS8bit                        EQU        2
  128. ;  Caller-supplied flatten function 
  129. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  130. ;  Caller-supplied filter function for Profile search 
  131. ; typedef long                             CMError
  132.  
  133. ;  For 1.0 and 2.0 profile header variants 
  134. ;  CMAppleProfileHeader 
  135. CMAppleProfileHeader    RECORD 0
  136. cm1                         ds        CMHeader        ; offset: $0 (0)
  137.                          ORG 0
  138. cm2                         ds        CM2Header        ; offset: $0 (0)
  139. sizeof                     EQU *                    ; size:   $80 (128)
  140.                         ENDR
  141. ;  Param for CWConcatColorWorld(…) 
  142. CMConcatProfileSet        RECORD 0
  143. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  144. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  145. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  146. sizeof                     EQU *                    ; size:   $8 (8)
  147.                         ENDR
  148. ;  ColorSync color data types 
  149. CMRGBColor                RECORD 0
  150. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  151. green                     ds.w    1                ; offset: $2 (2)
  152. blue                     ds.w    1                ; offset: $4 (4)
  153. sizeof                     EQU *                    ; size:   $6 (6)
  154.                         ENDR
  155. CMCMYKColor                RECORD 0
  156. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  157. magenta                     ds.w    1                ; offset: $2 (2)
  158. yellow                     ds.w    1                ; offset: $4 (4)
  159. black                     ds.w    1                ; offset: $6 (6)
  160. sizeof                     EQU *                    ; size:   $8 (8)
  161.                         ENDR
  162. CMCMYColor                RECORD 0
  163. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  164. magenta                     ds.w    1                ; offset: $2 (2)
  165. yellow                     ds.w    1                ; offset: $4 (4)
  166. sizeof                     EQU *                    ; size:   $6 (6)
  167.                         ENDR
  168. CMHLSColor                RECORD 0
  169. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  170. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  171. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  172. sizeof                     EQU *                    ; size:   $6 (6)
  173.                         ENDR
  174. CMHSVColor                RECORD 0
  175. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  176. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  177. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  178. sizeof                     EQU *                    ; size:   $6 (6)
  179.                         ENDR
  180. CMLabColor                RECORD 0
  181. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  182. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  183. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  184. sizeof                     EQU *                    ; size:   $6 (6)
  185.                         ENDR
  186. CMLuvColor                RECORD 0
  187. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  188. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  189. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  190. sizeof                     EQU *                    ; size:   $6 (6)
  191.                         ENDR
  192. CMYxyColor                RECORD 0
  193. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  194. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  195. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  196. sizeof                     EQU *                    ; size:   $6 (6)
  197.                         ENDR
  198. CMGrayColor                RECORD 0
  199. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  200. sizeof                     EQU *                    ; size:   $2 (2)
  201.                         ENDR
  202. CMMultichannel5Color    RECORD 0
  203. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  204.                          ORG 6
  205. sizeof                     EQU *                    ; size:   $6 (6)
  206.                         ENDR
  207. CMMultichannel6Color    RECORD 0
  208. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  209. sizeof                     EQU *                    ; size:   $6 (6)
  210.                         ENDR
  211. CMMultichannel7Color    RECORD 0
  212. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  213.                          ORG 8
  214. sizeof                     EQU *                    ; size:   $8 (8)
  215.                         ENDR
  216. CMMultichannel8Color    RECORD 0
  217. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  218. sizeof                     EQU *                    ; size:   $8 (8)
  219.                         ENDR
  220. CMNamedColor            RECORD 0
  221. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  222. sizeof                     EQU *                    ; size:   $4 (4)
  223.                         ENDR
  224. CMColor                    RECORD 0
  225. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  226.                          ORG 0
  227. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  228.                          ORG 0
  229. hls                         ds        CMHLSColor        ; offset: $0 (0)
  230.                          ORG 0
  231. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  232.                          ORG 0
  233. Lab                         ds        CMLabColor        ; offset: $0 (0)
  234.                          ORG 0
  235. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  236.                          ORG 0
  237. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  238.                          ORG 0
  239. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  240.                          ORG 0
  241. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  242.                          ORG 0
  243. gray                     ds        CMGrayColor        ; offset: $0 (0)
  244.                          ORG 0
  245. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  246.                          ORG 0
  247. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  248.                          ORG 0
  249. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  250.                          ORG 0
  251. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  252.                          ORG 0
  253. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  254.                          ORG 8
  255. sizeof                     EQU *                    ; size:   $8 (8)
  256.                         ENDR
  257. CMProfileSearchRecord    RECORD 0
  258. header                     ds        CMHeader        ; offset: $0 (0)
  259. fieldMask                 ds.l    1                ; offset: $40 (64)
  260. reserved                 ds.l    2                ; offset: $44 (68)
  261. sizeof                     EQU *                    ; size:   $4C (76)
  262.                         ENDR
  263. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  264.  
  265. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  266.  
  267. ;  Search definition for 2.0 
  268. CMSearchRecord            RECORD 0
  269. CMMType                     ds.l    1                ; offset: $0 (0)
  270. profileClass             ds.l    1                ; offset: $4 (4)
  271. dataColorSpace             ds.l    1                ; offset: $8 (8)
  272. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  273. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  274. deviceModel                 ds.l    1                ; offset: $14 (20)
  275. deviceAttributes         ds.l    2                ; offset: $18 (24)
  276. profileFlags             ds.l    1                ; offset: $20 (32)
  277. searchMask                 ds.l    1                ; offset: $24 (36)
  278. filter                     ds.l    1                ; offset: $28 (40)
  279. sizeof                     EQU *                    ; size:   $2C (44)
  280.                         ENDR
  281. ;  GetCWInfo structures 
  282. CMMInfoRecord            RECORD 0
  283. CMMType                     ds.l    1                ; offset: $0 (0)
  284. CMMVersion                 ds.l    1                ; offset: $4 (4)
  285. sizeof                     EQU *                    ; size:   $8 (8)
  286.                         ENDR
  287. CMCWInfoRecord            RECORD 0
  288. cmmCount                 ds.l    1                ; offset: $0 (0)
  289. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  290. sizeof                     EQU *                    ; size:   $14 (20)
  291.                         ENDR
  292.  
  293. cmNoColorPacking                EQU        $0000
  294. cmAlphaSpace                    EQU        $0080
  295. cmWord5ColorPacking                EQU        $0500
  296. cmLong8ColorPacking                EQU        $0800
  297. cmLong10ColorPacking            EQU        $0A00
  298. cmAlphaFirstPacking                EQU        $1000
  299. cmOneBitDirectPacking            EQU        $0B00
  300.  
  301. cmNoSpace                        EQU        0
  302. cmRGBSpace                        EQU        1
  303. cmCMYKSpace                        EQU        2
  304. cmHSVSpace                        EQU        3
  305. cmHLSSpace                        EQU        4
  306. cmYXYSpace                        EQU        5
  307. cmXYZSpace                        EQU        6
  308. cmLUVSpace                        EQU        7
  309. cmLABSpace                        EQU        8
  310. cmReservedSpace1                EQU        9
  311. cmGraySpace                        EQU        10
  312. cmReservedSpace2                EQU        11
  313. cmGamutResultSpace                EQU        12
  314. cmRGBASpace                        EQU        129
  315. cmGrayASpace                    EQU        138
  316. cmRGB16Space                    EQU        $0501
  317. cmRGB32Space                    EQU        $0801
  318. cmARGB32Space                    EQU        $1881
  319. cmCMYK32Space                    EQU        $0802
  320. cmHSV32Space                    EQU        $0A03
  321. cmHLS32Space                    EQU        $0A04
  322. cmYXY32Space                    EQU        $0A05
  323. cmXYZ32Space                    EQU        $0A06
  324. cmLUV32Space                    EQU        $0A07
  325. cmLAB32Space                    EQU        $0A08
  326. cmGamutResult1Space                EQU        $0B0C
  327. ; typedef unsigned long                 CMBitmapColorSpace
  328.  
  329. CMBitmap                RECORD 0
  330. image                     ds.l    1                ; offset: $0 (0)
  331. width                     ds.l    1                ; offset: $4 (4)
  332. height                     ds.l    1                ; offset: $8 (8)
  333. rowBytes                 ds.l    1                ; offset: $C (12)
  334. pixelSize                 ds.l    1                ; offset: $10 (16)
  335. space                     ds.l    1                ; offset: $14 (20)
  336. user1                     ds.l    1                ; offset: $18 (24)
  337. user2                     ds.l    1                ; offset: $1C (28)
  338. sizeof                     EQU *                    ; size:   $20 (32)
  339.                         ENDR
  340. ;  Classic Print Manager Stuff 
  341.  
  342. enableColorMatchingOp            EQU        12
  343. registerProfileOp                EQU        13
  344.  
  345. cmNoProfileBase                    EQU        0
  346. cmFileBasedProfile                EQU        1
  347. cmHandleBasedProfile            EQU        2
  348. cmPtrBasedProfile                EQU        3
  349. CMFileLocation            RECORD 0
  350. spec                     ds        FSSpec            ; offset: $0 (0)
  351. sizeof                     EQU *                    ; size:   $46 (70)
  352.                         ENDR
  353. CMHandleLocation        RECORD 0
  354. h                         ds.l    1                ; offset: $0 (0)
  355. sizeof                     EQU *                    ; size:   $4 (4)
  356.                         ENDR
  357. CMPtrLocation            RECORD 0
  358. p                         ds.l    1                ; offset: $0 (0)
  359. sizeof                     EQU *                    ; size:   $4 (4)
  360.                         ENDR
  361. CMProfLoc                RECORD 0
  362. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  363.                          ORG 0
  364. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  365.                          ORG 0
  366. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  367.                          ORG 70
  368. sizeof                     EQU *                    ; size:   $46 (70)
  369.                         ENDR
  370. CMProfileLocation        RECORD 0
  371. locType                     ds.w    1                ; offset: $0 (0)
  372. u                         ds        CMProfLoc        ; offset: $2 (2)
  373. sizeof                     EQU *                    ; size:   $48 (72)
  374.                         ENDR
  375. ;  Profile file and element access 
  376. ;
  377. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  378. ;
  379.     IF ¬ GENERATINGCFM THEN
  380.         Macro
  381.         _CMNewProfile
  382.             move.l              #$0008001B,D0
  383.             dc.w                $ABEE
  384.         EndM
  385.     ELSE
  386.         IMPORT_CFM_FUNCTION CMNewProfile
  387.     ENDIF
  388.  
  389. ;
  390. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  391. ;
  392.     IF ¬ GENERATINGCFM THEN
  393.         Macro
  394.         _CMOpenProfile
  395.             move.l              #$0008001C,D0
  396.             dc.w                $ABEE
  397.         EndM
  398.     ELSE
  399.         IMPORT_CFM_FUNCTION CMOpenProfile
  400.     ENDIF
  401.  
  402. ;
  403. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  404. ;
  405.     IF ¬ GENERATINGCFM THEN
  406.         Macro
  407.         _CMCloseProfile
  408.             move.l              #$0004001D,D0
  409.             dc.w                $ABEE
  410.         EndM
  411.     ELSE
  412.         IMPORT_CFM_FUNCTION CMCloseProfile
  413.     ENDIF
  414.  
  415. ;
  416. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  417. ;
  418.     IF ¬ GENERATINGCFM THEN
  419.         Macro
  420.         _CMUpdateProfile
  421.             move.l              #$00040034,D0
  422.             dc.w                $ABEE
  423.         EndM
  424.     ELSE
  425.         IMPORT_CFM_FUNCTION CMUpdateProfile
  426.     ENDIF
  427.  
  428. ;
  429. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  430. ;
  431.     IF ¬ GENERATINGCFM THEN
  432.         Macro
  433.         _CMCopyProfile
  434.             move.l              #$000C0025,D0
  435.             dc.w                $ABEE
  436.         EndM
  437.     ELSE
  438.         IMPORT_CFM_FUNCTION CMCopyProfile
  439.     ENDIF
  440.  
  441. ;
  442. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  443. ;
  444.     IF ¬ GENERATINGCFM THEN
  445.         Macro
  446.         _CMValidateProfile
  447.             move.l              #$000C0026,D0
  448.             dc.w                $ABEE
  449.         EndM
  450.     ELSE
  451.         IMPORT_CFM_FUNCTION CMValidateProfile
  452.     ENDIF
  453.  
  454. ;
  455. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  456. ;
  457.     IF ¬ GENERATINGCFM THEN
  458.         Macro
  459.         _CMGetProfileLocation
  460.             move.l              #$0008003C,D0
  461.             dc.w                $ABEE
  462.         EndM
  463.     ELSE
  464.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  465.     ENDIF
  466.  
  467. ;
  468. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  469. ;
  470.     IF ¬ GENERATINGCFM THEN
  471.         Macro
  472.         _CMFlattenProfile
  473.             move.l              #$00140031,D0
  474.             dc.w                $ABEE
  475.         EndM
  476.     ELSE
  477.         IMPORT_CFM_FUNCTION CMFlattenProfile
  478.     ENDIF
  479.  
  480. ;
  481. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  482. ;
  483.     IF ¬ GENERATINGCFM THEN
  484.         Macro
  485.         _CMUnflattenProfile
  486.             move.l              #$00100032,D0
  487.             dc.w                $ABEE
  488.         EndM
  489.     ELSE
  490.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  491.     ENDIF
  492.  
  493. ;
  494. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  495. ;
  496.     IF ¬ GENERATINGCFM THEN
  497.         Macro
  498.         _CMGetProfileHeader
  499.             move.l              #$00080039,D0
  500.             dc.w                $ABEE
  501.         EndM
  502.     ELSE
  503.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  504.     ENDIF
  505.  
  506. ;
  507. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  508. ;
  509.     IF ¬ GENERATINGCFM THEN
  510.         Macro
  511.         _CMSetProfileHeader
  512.             move.l              #$0008003A,D0
  513.             dc.w                $ABEE
  514.         EndM
  515.     ELSE
  516.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  517.     ENDIF
  518.  
  519. ;
  520. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  521. ;
  522.     IF ¬ GENERATINGCFM THEN
  523.         Macro
  524.         _CMProfileElementExists
  525.             move.l              #$000C001E,D0
  526.             dc.w                $ABEE
  527.         EndM
  528.     ELSE
  529.         IMPORT_CFM_FUNCTION CMProfileElementExists
  530.     ENDIF
  531.  
  532. ;
  533. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  534. ;
  535.     IF ¬ GENERATINGCFM THEN
  536.         Macro
  537.         _CMCountProfileElements
  538.             move.l              #$0008001F,D0
  539.             dc.w                $ABEE
  540.         EndM
  541.     ELSE
  542.         IMPORT_CFM_FUNCTION CMCountProfileElements
  543.     ENDIF
  544.  
  545. ;
  546. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  547. ;
  548.     IF ¬ GENERATINGCFM THEN
  549.         Macro
  550.         _CMGetProfileElement
  551.             move.l              #$00100020,D0
  552.             dc.w                $ABEE
  553.         EndM
  554.     ELSE
  555.         IMPORT_CFM_FUNCTION CMGetProfileElement
  556.     ENDIF
  557.  
  558. ;
  559. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  560. ;
  561.     IF ¬ GENERATINGCFM THEN
  562.         Macro
  563.         _CMSetProfileElement
  564.             move.l              #$00100023,D0
  565.             dc.w                $ABEE
  566.         EndM
  567.     ELSE
  568.         IMPORT_CFM_FUNCTION CMSetProfileElement
  569.     ENDIF
  570.  
  571. ;
  572. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  573. ;
  574.     IF ¬ GENERATINGCFM THEN
  575.         Macro
  576.         _CMSetProfileElementSize
  577.             move.l              #$000C0038,D0
  578.             dc.w                $ABEE
  579.         EndM
  580.     ELSE
  581.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  582.     ENDIF
  583.  
  584. ;
  585. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  586. ;
  587.     IF ¬ GENERATINGCFM THEN
  588.         Macro
  589.         _CMSetProfileElementReference
  590.             move.l              #$000C0035,D0
  591.             dc.w                $ABEE
  592.         EndM
  593.     ELSE
  594.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  595.     ENDIF
  596.  
  597. ;
  598. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  599. ;
  600.     IF ¬ GENERATINGCFM THEN
  601.         Macro
  602.         _CMGetPartialProfileElement
  603.             move.l              #$00140036,D0
  604.             dc.w                $ABEE
  605.         EndM
  606.     ELSE
  607.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  608.     ENDIF
  609.  
  610. ;
  611. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  612. ;
  613.     IF ¬ GENERATINGCFM THEN
  614.         Macro
  615.         _CMSetPartialProfileElement
  616.             move.l              #$00140037,D0
  617.             dc.w                $ABEE
  618.         EndM
  619.     ELSE
  620.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  621.     ENDIF
  622.  
  623. ;
  624. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  625. ;
  626.     IF ¬ GENERATINGCFM THEN
  627.         Macro
  628.         _CMGetIndProfileElementInfo
  629.             move.l              #$00140021,D0
  630.             dc.w                $ABEE
  631.         EndM
  632.     ELSE
  633.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  634.     ENDIF
  635.  
  636. ;
  637. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  638. ;
  639.     IF ¬ GENERATINGCFM THEN
  640.         Macro
  641.         _CMGetIndProfileElement
  642.             move.l              #$00100022,D0
  643.             dc.w                $ABEE
  644.         EndM
  645.     ELSE
  646.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  647.     ENDIF
  648.  
  649. ;
  650. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  651. ;
  652.     IF ¬ GENERATINGCFM THEN
  653.         Macro
  654.         _CMRemoveProfileElement
  655.             move.l              #$00080024,D0
  656.             dc.w                $ABEE
  657.         EndM
  658.     ELSE
  659.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  660.     ENDIF
  661.  
  662. ;
  663. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  664. ;
  665.     IF ¬ GENERATINGCFM THEN
  666.         Macro
  667.         _CMGetScriptProfileDescription
  668.             move.l              #$000C003E,D0
  669.             dc.w                $ABEE
  670.         EndM
  671.     ELSE
  672.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  673.     ENDIF
  674.  
  675. ;  Low-level matching functions 
  676. ;
  677. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  678. ;
  679.     IF ¬ GENERATINGCFM THEN
  680.         Macro
  681.         _NCWNewColorWorld
  682.             move.l              #$000C0014,D0
  683.             dc.w                $ABEE
  684.         EndM
  685.     ELSE
  686.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  687.     ENDIF
  688.  
  689. ;
  690. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  691. ;
  692.     IF ¬ GENERATINGCFM THEN
  693.         Macro
  694.         _CWConcatColorWorld
  695.             move.l              #$00080015,D0
  696.             dc.w                $ABEE
  697.         EndM
  698.     ELSE
  699.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  704. ;
  705.     IF ¬ GENERATINGCFM THEN
  706.         Macro
  707.         _CWNewLinkProfile
  708.             move.l              #$000C0033,D0
  709.             dc.w                $ABEE
  710.         EndM
  711.     ELSE
  712.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  713.     ENDIF
  714.  
  715. ;
  716. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  717. ;
  718.     IF ¬ GENERATINGCFM THEN
  719.         Macro
  720.         _CWDisposeColorWorld
  721.             move.l              #$00040001,D0
  722.             dc.w                $ABEE
  723.         EndM
  724.     ELSE
  725.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  726.     ENDIF
  727.  
  728. ;
  729. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  730. ;
  731.     IF ¬ GENERATINGCFM THEN
  732.         Macro
  733.         _CWMatchColors
  734.             move.l              #$000C0002,D0
  735.             dc.w                $ABEE
  736.         EndM
  737.     ELSE
  738.         IMPORT_CFM_FUNCTION CWMatchColors
  739.     ENDIF
  740.  
  741. ;
  742. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  743. ;
  744.     IF ¬ GENERATINGCFM THEN
  745.         Macro
  746.         _CWCheckColors
  747.             move.l              #$00100003,D0
  748.             dc.w                $ABEE
  749.         EndM
  750.     ELSE
  751.         IMPORT_CFM_FUNCTION CWCheckColors
  752.     ENDIF
  753.  
  754. ;  Bitmap matching 
  755. ;
  756. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  757. ;
  758.     IF ¬ GENERATINGCFM THEN
  759.         Macro
  760.         _CWMatchBitmap
  761.             move.l              #$0010002C,D0
  762.             dc.w                $ABEE
  763.         EndM
  764.     ELSE
  765.         IMPORT_CFM_FUNCTION CWMatchBitmap
  766.     ENDIF
  767.  
  768. ;
  769. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  770. ;
  771.     IF ¬ GENERATINGCFM THEN
  772.         Macro
  773.         _CWCheckBitmap
  774.             move.l              #$0014002D,D0
  775.             dc.w                $ABEE
  776.         EndM
  777.     ELSE
  778.         IMPORT_CFM_FUNCTION CWCheckBitmap
  779.     ENDIF
  780.  
  781. ;  Quickdraw-specific matching 
  782. ;
  783. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  784. ;
  785.     IF ¬ GENERATINGCFM THEN
  786.         Macro
  787.         _CWMatchPixMap
  788.             move.l              #$00100004,D0
  789.             dc.w                $ABEE
  790.         EndM
  791.     ELSE
  792.         IMPORT_CFM_FUNCTION CWMatchPixMap
  793.     ENDIF
  794.  
  795. ;
  796. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  797. ;
  798.     IF ¬ GENERATINGCFM THEN
  799.         Macro
  800.         _CWCheckPixMap
  801.             move.l              #$00140007,D0
  802.             dc.w                $ABEE
  803.         EndM
  804.     ELSE
  805.         IMPORT_CFM_FUNCTION CWCheckPixMap
  806.     ENDIF
  807.  
  808. ;
  809. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  810. ;
  811.     IF ¬ GENERATINGCFM THEN
  812.         Macro
  813.         _NCMBeginMatching
  814.             move.l              #$000C0016,D0
  815.             dc.w                $ABEE
  816.         EndM
  817.     ELSE
  818.         IMPORT_CFM_FUNCTION NCMBeginMatching
  819.     ENDIF
  820.  
  821. ;
  822. ; pascal void CMEndMatching(CMMatchRef myRef)
  823. ;
  824.     IF ¬ GENERATINGCFM THEN
  825.         Macro
  826.         _CMEndMatching
  827.             move.l              #$0004000B,D0
  828.             dc.w                $ABEE
  829.         EndM
  830.     ELSE
  831.         IMPORT_CFM_FUNCTION CMEndMatching
  832.     ENDIF
  833.  
  834. ;
  835. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  836. ;
  837.     IF ¬ GENERATINGCFM THEN
  838.         Macro
  839.         _NCMDrawMatchedPicture
  840.             move.l              #$000C0017,D0
  841.             dc.w                $ABEE
  842.         EndM
  843.     ELSE
  844.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  845.     ENDIF
  846.  
  847. ;
  848. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  849. ;
  850.     IF ¬ GENERATINGCFM THEN
  851.         Macro
  852.         _CMEnableMatchingComment
  853.             move.l              #$0002000D,D0
  854.             dc.w                $ABEE
  855.         EndM
  856.     ELSE
  857.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  858.     ENDIF
  859.  
  860. ;
  861. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  862. ;
  863.     IF ¬ GENERATINGCFM THEN
  864.         Macro
  865.         _NCMUseProfileComment
  866.             move.l              #$0008003B,D0
  867.             dc.w                $ABEE
  868.         EndM
  869.     ELSE
  870.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  871.     ENDIF
  872.  
  873. ;  System Profile access 
  874. ;
  875. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  876. ;
  877.     IF ¬ GENERATINGCFM THEN
  878.         Macro
  879.         _CMGetSystemProfile
  880.             move.l              #$00040018,D0
  881.             dc.w                $ABEE
  882.         EndM
  883.     ELSE
  884.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  885.     ENDIF
  886.  
  887. ;
  888. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  889. ;
  890.     IF ¬ GENERATINGCFM THEN
  891.         Macro
  892.         _CMSetSystemProfile
  893.             move.l              #$00040019,D0
  894.             dc.w                $ABEE
  895.         EndM
  896.     ELSE
  897.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  898.     ENDIF
  899.  
  900. ;  External Profile Management 
  901. ;
  902. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  903. ;
  904.     IF ¬ GENERATINGCFM THEN
  905.         Macro
  906.         _CMNewProfileSearch
  907.             move.l              #$00100027,D0
  908.             dc.w                $ABEE
  909.         EndM
  910.     ELSE
  911.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  912.     ENDIF
  913.  
  914. ;
  915. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  916. ;
  917.     IF ¬ GENERATINGCFM THEN
  918.         Macro
  919.         _CMUpdateProfileSearch
  920.             move.l              #$000C0028,D0
  921.             dc.w                $ABEE
  922.         EndM
  923.     ELSE
  924.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  929. ;
  930.     IF ¬ GENERATINGCFM THEN
  931.         Macro
  932.         _CMDisposeProfileSearch
  933.             move.l              #$00040029,D0
  934.             dc.w                $ABEE
  935.         EndM
  936.     ELSE
  937.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  938.     ENDIF
  939.  
  940. ;
  941. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  942. ;
  943.     IF ¬ GENERATINGCFM THEN
  944.         Macro
  945.         _CMSearchGetIndProfile
  946.             move.l              #$000C002A,D0
  947.             dc.w                $ABEE
  948.         EndM
  949.     ELSE
  950.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  951.     ENDIF
  952.  
  953. ;
  954. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  955. ;
  956.     IF ¬ GENERATINGCFM THEN
  957.         Macro
  958.         _CMSearchGetIndProfileFileSpec
  959.             move.l              #$000C002B,D0
  960.             dc.w                $ABEE
  961.         EndM
  962.     ELSE
  963.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  964.     ENDIF
  965.  
  966. ;  Utilities 
  967. ;
  968. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  969. ;
  970.     IF ¬ GENERATINGCFM THEN
  971.         Macro
  972.         _CMGetColorSyncFolderSpec
  973.             move.l              #$000C0011,D0
  974.             dc.w                $ABEE
  975.         EndM
  976.     ELSE
  977.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  978.     ENDIF
  979.  
  980. ;
  981. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  982. ;
  983.     IF ¬ GENERATINGCFM THEN
  984.         Macro
  985.         _CMGetCWInfo
  986.             move.l              #$0008001A,D0
  987.             dc.w                $ABEE
  988.         EndM
  989.     ELSE
  990.         IMPORT_CFM_FUNCTION CMGetCWInfo
  991.     ENDIF
  992.  
  993. ;  PS-related 
  994. ;
  995. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  996. ;
  997.     IF ¬ GENERATINGCFM THEN
  998.         Macro
  999.         _CMGetPS2ColorSpace
  1000.             move.l              #$0014002E,D0
  1001.             dc.w                $ABEE
  1002.         EndM
  1003.     ELSE
  1004.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1005.     ENDIF
  1006.  
  1007. ;
  1008. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1009. ;
  1010.     IF ¬ GENERATINGCFM THEN
  1011.         Macro
  1012.         _CMGetPS2ColorRenderingIntent
  1013.             move.l              #$0014002F,D0
  1014.             dc.w                $ABEE
  1015.         EndM
  1016.     ELSE
  1017.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1018.     ENDIF
  1019.  
  1020. ;
  1021. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1022. ;
  1023.     IF ¬ GENERATINGCFM THEN
  1024.         Macro
  1025.         _CMGetPS2ColorRendering
  1026.             move.l              #$00180030,D0
  1027.             dc.w                $ABEE
  1028.         EndM
  1029.     ELSE
  1030.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1031.     ENDIF
  1032.  
  1033. ;
  1034. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1035. ;
  1036.     IF ¬ GENERATINGCFM THEN
  1037.         Macro
  1038.         _CMGetPS2ColorRenderingVMSize
  1039.             move.l              #$0010003D,D0
  1040.             dc.w                $ABEE
  1041.         EndM
  1042.     ELSE
  1043.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1044.     ENDIF
  1045.  
  1046. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1047. ;
  1048. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1049. ;
  1050.     IF ¬ GENERATINGCFM THEN
  1051.         Macro
  1052.         _CWNewColorWorld
  1053.             move.l              #$000C0000,D0
  1054.             dc.w                $ABEE
  1055.         EndM
  1056.     ELSE
  1057.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1058.     ENDIF
  1059.  
  1060. ;
  1061. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1062. ;
  1063.     IF ¬ GENERATINGCFM THEN
  1064.         Macro
  1065.         _ConcatenateProfiles
  1066.             move.l              #$000C000C,D0
  1067.             dc.w                $ABEE
  1068.         EndM
  1069.     ELSE
  1070.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1071.     ENDIF
  1072.  
  1073. ;
  1074. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1075. ;
  1076.     IF ¬ GENERATINGCFM THEN
  1077.         Macro
  1078.         _CMBeginMatching
  1079.             move.l              #$000C000A,D0
  1080.             dc.w                $ABEE
  1081.         EndM
  1082.     ELSE
  1083.         IMPORT_CFM_FUNCTION CMBeginMatching
  1084.     ENDIF
  1085.  
  1086. ;
  1087. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1088. ;
  1089.     IF ¬ GENERATINGCFM THEN
  1090.         Macro
  1091.         _CMDrawMatchedPicture
  1092.             move.l              #$000C0009,D0
  1093.             dc.w                $ABEE
  1094.         EndM
  1095.     ELSE
  1096.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1097.     ENDIF
  1098.  
  1099. ;
  1100. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1101. ;
  1102.     IF ¬ GENERATINGCFM THEN
  1103.         Macro
  1104.         _CMUseProfileComment
  1105.             move.l              #$00040008,D0
  1106.             dc.w                $ABEE
  1107.         EndM
  1108.     ELSE
  1109.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1110.     ENDIF
  1111.  
  1112. ;
  1113. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1114. ;
  1115.     IF ¬ GENERATINGCFM THEN
  1116.         Macro
  1117.         _CMGetProfileName
  1118.             move.l              #$0008000E,D0
  1119.             dc.w                $ABEE
  1120.         EndM
  1121.     ELSE
  1122.         IMPORT_CFM_FUNCTION CMGetProfileName
  1123.     ENDIF
  1124.  
  1125. ;
  1126. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1127. ;
  1128.     IF ¬ GENERATINGCFM THEN
  1129.         Macro
  1130.         _CMGetProfileAdditionalDataOffset
  1131.             move.l              #$0004000F,D0
  1132.             dc.w                $ABEE
  1133.         EndM
  1134.     ELSE
  1135.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1136.     ENDIF
  1137.  
  1138. ;  ProfileResponder functions 
  1139. ;
  1140. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1141. ;
  1142.     IF ¬ GENERATINGCFM THEN
  1143.         Macro
  1144.         _GetProfile
  1145.             move.l              #$00100005,D0
  1146.             dc.w                $ABEE
  1147.         EndM
  1148.     ELSE
  1149.         IMPORT_CFM_FUNCTION GetProfile
  1150.     ENDIF
  1151.  
  1152. ;
  1153. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1154. ;
  1155.     IF ¬ GENERATINGCFM THEN
  1156.         Macro
  1157.         _SetProfile
  1158.             move.l              #$000C0006,D0
  1159.             dc.w                $ABEE
  1160.         EndM
  1161.     ELSE
  1162.         IMPORT_CFM_FUNCTION SetProfile
  1163.     ENDIF
  1164.  
  1165. ;
  1166. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1167. ;
  1168.     IF ¬ GENERATINGCFM THEN
  1169.         Macro
  1170.         _SetProfileDescription
  1171.             move.l              #$00100010,D0
  1172.             dc.w                $ABEE
  1173.         EndM
  1174.     ELSE
  1175.         IMPORT_CFM_FUNCTION SetProfileDescription
  1176.     ENDIF
  1177.  
  1178. ;
  1179. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1180. ;
  1181.     IF ¬ GENERATINGCFM THEN
  1182.         Macro
  1183.         _GetIndexedProfile
  1184.             move.l              #$00140012,D0
  1185.             dc.w                $ABEE
  1186.         EndM
  1187.     ELSE
  1188.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1189.     ENDIF
  1190.  
  1191. ;
  1192. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1193. ;
  1194.     IF ¬ GENERATINGCFM THEN
  1195.         Macro
  1196.         _DeleteDeviceProfile
  1197.             move.l              #$000C0013,D0
  1198.             dc.w                $ABEE
  1199.         EndM
  1200.     ELSE
  1201.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  1202.     ENDIF
  1203.  
  1204.     IF OLDROUTINENAMES THEN
  1205. ;  constants 
  1206.  
  1207. kMatchCMMType                    EQU        $00000001
  1208. kMatchApplProfileVersion        EQU        $00000002
  1209. kMatchDataType                    EQU        $00000004
  1210. kMatchDeviceType                EQU        $00000008
  1211. kMatchDeviceManufacturer        EQU        $00000010
  1212. kMatchDeviceModel                EQU        $00000020
  1213. kMatchDeviceAttributes            EQU        $00000040
  1214. kMatchFlags                        EQU        $00000080
  1215. kMatchOptions                    EQU        $00000100
  1216. kMatchWhite                        EQU        $00000200
  1217. kMatchBlack                        EQU        $00000400
  1218. ;  types 
  1219. CMYKColor                RECORD 0
  1220. f                         ds        CMCMYKColor
  1221. sizeof                     EQU *                    ; size:   $8 (8)
  1222.                         ENDR
  1223.  
  1224.  
  1225. ; typedef CMWorldRef                     CWorld
  1226.  
  1227. ; typedef long *                        CMGamutResult
  1228.  
  1229. ;  functions 
  1230. ;
  1231. ; pascal void EndMatching(CMMatchRef myRef)
  1232. ;
  1233.     IF ¬ GENERATINGCFM THEN
  1234.         Macro
  1235.         _EndMatching
  1236.             move.l              #$0004000B,D0
  1237.             dc.w                $ABEE
  1238.         EndM
  1239.     ELSE
  1240.         IMPORT_CFM_FUNCTION EndMatching
  1241.     ENDIF
  1242.  
  1243. ;
  1244. ; pascal void EnableMatching(Boolean enableIt)
  1245. ;
  1246.     IF ¬ GENERATINGCFM THEN
  1247.         Macro
  1248.         _EnableMatching
  1249.             move.l              #$0002000D,D0
  1250.             dc.w                $ABEE
  1251.         EndM
  1252.     ELSE
  1253.         IMPORT_CFM_FUNCTION EnableMatching
  1254.     ENDIF
  1255.  
  1256. ;
  1257. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1258. ;
  1259.     IF ¬ GENERATINGCFM THEN
  1260.         Macro
  1261.         _GetColorSyncFolderSpec
  1262.             move.l              #$000C0011,D0
  1263.             dc.w                $ABEE
  1264.         EndM
  1265.     ELSE
  1266.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  1267.     ENDIF
  1268.  
  1269. ;
  1270. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1271. ;
  1272.     IF ¬ GENERATINGCFM THEN
  1273.         Macro
  1274.         _BeginMatching
  1275.             move.l              #$000C000A,D0
  1276.             dc.w                $ABEE
  1277.         EndM
  1278.     ELSE
  1279.         IMPORT_CFM_FUNCTION BeginMatching
  1280.     ENDIF
  1281.  
  1282. ;
  1283. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1284. ;
  1285.     IF ¬ GENERATINGCFM THEN
  1286.         Macro
  1287.         _DrawMatchedPicture
  1288.             move.l              #$000C0009,D0
  1289.             dc.w                $ABEE
  1290.         EndM
  1291.     ELSE
  1292.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  1293.     ENDIF
  1294.  
  1295. ;
  1296. ; pascal CMError UseProfile(CMProfileHandle profile)
  1297. ;
  1298.     IF ¬ GENERATINGCFM THEN
  1299.         Macro
  1300.         _UseProfile
  1301.             move.l              #$00040008,D0
  1302.             dc.w                $ABEE
  1303.         EndM
  1304.     ELSE
  1305.         IMPORT_CFM_FUNCTION UseProfile
  1306.     ENDIF
  1307.  
  1308. ;
  1309. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1310. ;
  1311.     IF ¬ GENERATINGCFM THEN
  1312.         Macro
  1313.         _GetProfileName
  1314.             move.l              #$0008000E,D0
  1315.             dc.w                $ABEE
  1316.         EndM
  1317.     ELSE
  1318.         IMPORT_CFM_FUNCTION GetProfileName
  1319.     ENDIF
  1320.  
  1321. ;
  1322. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1323. ;
  1324.     IF ¬ GENERATINGCFM THEN
  1325.         Macro
  1326.         _GetProfileAdditionalDataOffset
  1327.             move.l              #$0004000F,D0
  1328.             dc.w                $ABEE
  1329.         EndM
  1330.     ELSE
  1331.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  1332.     ENDIF
  1333.  
  1334.     ENDIF
  1335.     ENDIF
  1336.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  1337. ;  PrGeneral parameter blocks 
  1338. TEnableColorMatchingBlk    RECORD 0
  1339. iOpCode                     ds.w    1                ; offset: $0 (0)
  1340. iError                     ds.w    1                ; offset: $2 (2)
  1341. lReserved                 ds.l    1                ; offset: $4 (4)
  1342. hPrint                     ds.l    1                ; offset: $8 (8)
  1343. fEnableIt                 ds.b    1                ; offset: $C (12)
  1344. filler                     ds.b    1                ; offset: $D (13)
  1345. sizeof                     EQU *                    ; size:   $E (14)
  1346.                         ENDR
  1347. TRegisterProfileBlk        RECORD 0
  1348. iOpCode                     ds.w    1                ; offset: $0 (0)
  1349. iError                     ds.w    1                ; offset: $2 (2)
  1350. lReserved                 ds.l    1                ; offset: $4 (4)
  1351. hPrint                     ds.l    1                ; offset: $8 (8)
  1352. fRegisterIt                 ds.b    1                ; offset: $C (12)
  1353. filler                     ds.b    1                ; offset: $D (13)
  1354. sizeof                     EQU *                    ; size:   $E (14)
  1355.                         ENDR
  1356.     ENDIF
  1357.     ENDIF ; __CMAPPLICATION__ 
  1358.  
  1359.